home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 7 / Eagles_Nest_Mac_Collection_Disc_7.TOAST / Other Newsletters / 4DNews#3 < prev    next >
Text File  |  1994-07-01  |  9KB  |  62 lines

  1. Newsletter Notes     by Carolyn Fuller        February 28, 1990
  2.  
  3. Corrections & Additions to the 1/30/90 newsletter:
  4.  
  5. Deleting Linked Sub-Records. It seems that automatic delete buttons do not work on full-page included layouts. ACIUS should have a fix available by now. If you need the fix, they will send it to you upon request. The work around is to the delete the "included" records from the "parent" layout. BTW, issuing the command "DELETE SUBRECORD" from a button on the full-page layout caused ALL subrecords to be deleted, when we tried it at the last month's meeting! 
  6.  
  7. The Importance of Using Data Input Filters. A much more serious concern about data that contains invisible control characters embedded in fields is that these characters have the potential to confuse 4D and corrupt your database. The most common way we have seen evidence of this problem is through bad imports, usually from a DOS machine. (It's Big Blue attacking us from the rear!) But I1 was able to recreate it by entering Control A and Control S, Char(1) & Char(19), through an input layout. What happened when this data was accepted was that I was unable to double click it. Every time I tried, the record would "scoot" out from under the mouse and I would find the NeXt record selected! Another symptom, that has been reported is, frequent 4D dialog boxes telling the user that a record is causing problems and needs to be deleted. If the user does not indicate that 4D can delete the "bad" record, the dialog box keeps reappearing. Tools indicates serious damage. 
  8.  
  9. Once this has happened to a database:
  10. 1) Export ALL your files as text. You might have to nurse it along, loosing the records that 4D decides it must delete.
  11.  
  12. 2) Massage the text files using MacSink. MacSink has an option, Strip Control Characters, which will clean up the data. MacSink is a public domain utility which can either be found on CI$ or through our local BCS Mac office (625-7080). 
  13.  
  14. 3) After the export & clean up of ALL your files, trash the old 4D data file and create a new one. 
  15.  
  16. 4) Import the cleaned up data into this new data file. (And if you are working with a paranoid fellow developer, start with a fresh backed up structure file, also. John, I really did trash everything & restore from backups, after testing! Honest!)
  17.  
  18. How to keep this from happening to you or your loved ones:
  19. - Data Entry
  20. 1) John Beaulieu says he and Dave Terry are looking into the problem now. 
  21.  
  22. 2) In the meantime, John recommends using filters on your alpha fields to keep the problems from entering through data entry.  I decided to revisit filters since my initial reaction to them in September was "Yuck". But that reaction seems to be more appropriate for placeholders and field display formats. There seems to be a consensus among developers that using a combo of placeholders & the field display formats is undesirable. A straight filter, such as the one that follows might cause Peter to "$%*#()&@!" but at least it seemed reasonable from the user interface angle:
  23. &" -}"
  24. This translates to space through curly bracket, which covers Char(32) through Char(125). Until my clients start hollering this is probably the way I will go. 
  25.  
  26. 3) Another method is writing a routine to strip out control characters. This routine could be put into a layout procedure, scripts or even a file procedure. File procedures are now only executed in an input layout's during phase. The only problem, I found with a File procedure was that I could not get it to recognize that the Last area was not a field. My initial testing indicated that the file procedure always tested the last FIELD area even if a variable was modified????? There were also conflicts between field scripts and the File procedure. 
  27. - Import
  28.  
  29. 1) Aparajita recommends using an ASCII map to edit out any control characters you want to edit out. See 151-154 of the User Reference and 314 of the Language Reference. 
  30.  
  31. 2) I have not personally seen these bogus text files that have come from the DOS world. But in my custom imports, I've come across predictable problems which have been fairly easy to spot with a quick RECEIVE PACKET on a few fields from the first record and the first field of the second record. I check the length of a few fields and then receive to the end of the first record and test the first field of the next record. If the first field is either an incorrect length or the first character of this record is a control character, I know that Red Ryder has inserted an extra line feed, which needs to be stripped prior to importing into 4D. After these spot checks indicate all is well, I close the document and import the text. Otherwise, I BEEP and give them someone else's number to call for support! :>
  32.  
  33. 3) If you are a user, you might want to open all your documents in Excel or Word and look for unsightly 's. (Just in case that did not print, it is a box where a letter should have appeared.) Don't try to use Word's search and replace to replace these. You might not catch them all. Either get hold of MacSink from the local BCS Mac office (625-7080) or recreate your text file with another download or call one of our wonderful, talented, expensive... developers!
  34.  
  35. 3) Use a variation of Wayne Fox's code that Peter published last month. This will be VERY time consuming since you must replace ALL control characters, not just quotes and asterisks!
  36.  
  37. 4D New Product News
  38.  
  39. By now everyone has figured out that it was 4D Mover that Tony bought with him to the last SIG and that started shipping at the beginning of February and not XRef. Was this a bit of wishful thinking on your part, Peter?
  40.  
  41. 4D Training Classes John Zoltai's shell costs $100 if you do not get it free with the MBA Series Accounting products or through a class. It does not have all the bells and whistles that Tony's shell has but for those developers who prefer to travel light, it's a great navigational event loop that will stay out of your way and it is easy to tweak!
  42.  
  43. Highlites & Lolites of the CI$ for 2/1/90 - 2/7/90 
  44.  
  45. You can get copies of CI$ messages on diskette. A hard copy print out is also available for loan.
  46.  
  47.  
  48. Job Opportunities: ACIUS currently has an opening for a sales person to cover the Texas region, if anyone is interested in relocating to Dallas/Fort Worth. Call Bruce Finch, Director of Sales and Training (408 252-4444 ext 201).
  49.  
  50. Here in New England, Pro-Developed Software, Inc (PDS) has some leads for both permanent programming positions and temporary consulting jobs. Call Bob Jackson (800 648-2852).
  51.  
  52. MultiUser Deletes and 2.0.10: When 4D encounters a locked record during the execution of the command DELETE SELECTION, it will just stop deleting records. The function, Locked does not return True. Tim Wilson reported that locked records do cause an error and can be trapped with On Err Call. You can use this fact to build a routine to get around the problem or you can use ACIUS's Tech Note #90 as a work around.
  53.  
  54. Local Parameter Variables in Functions ($1, $2, etc): The interpreter sometimes gets confused dereferencing these variables when they are pointers. Try assigning these pointer parameter variables to a local variable, if you encounter problems. In fact, the interpreter sometimes has trouble with local variables. Anytime something should work and it is not, try changing a local variable to a global variable or a parameter variable ($1,etc) to a local variable. Good ole' trial and error programming!
  55.  
  56. Redraw problems with variables in "parent" layouts when subrecords are modified: The problem is encountered when the subrecord or related record has been modified in a full-page layout. There is no During phase executed for the Parent Layout. One method of solving this problem is posting an event to the parent layout causing a during phase to execute and "redraw" or re-calculate variables. This can be done by using an external, either PostEvt by Ian Abel or PostKey by ACIUS. PostEvt is part of a commercial package. PostKey is free from ACIUS but there are unconfirmed rumors that it does not work under all circumstances.
  57.  
  58.  
  59. HOT TIPS: MacUser began a new column in their Power Tools  section, by Thom Hogan & Kurt Matthies in their February issue. They promise to teach programming principles to the novice user, using THINK C 4.0 by Symantec as the language. There are several of us who will be following this tutorial in the coming months. If you want to join us and have any questions about the tutorial, either general or specific, feel free to call Carolyn (661-7138 - e).
  60. 1No one else has been able to duplicate this finding. 
  61.  
  62.